class Animal():
    
    def __init__(self,name,weight,color):
        self.name = name
        self.weight = weight
        self.color = color
#  通过  实例化 --> 对象
#  代表实例化之后的 对象
#     print(self.name)
    def eat(self,eat_what):
        print('吃{}'.format(eat_what))
    def sleep(self):
        print(self.name)
        self.eat('鱼')
        print('呼呼呼')
    def run(self,run_how):
        print('run:{}'.format(run_how))
    def call(self,call_how):
        print(call_how)
dog = Animal('猫','18kg','black')
dog.sleep()
setattr(dog,'age',12)
print(vars([dog]))
# setattr(dog,'age',12)

# print(Animal.__dict__)
# print(Animal.age)
# print(dog.__dict__)
# print(dog.age)
# repr(dog)
# print(repr(dog))